package com.itheima.Service.imple;

import com.itheima.Service.ReportService;
import com.itheima.entity.Gender;
import com.itheima.entity.JobSum;
import com.itheima.mapper.ReportMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ReportServiceImpl implements ReportService {
    @Autowired
    private ReportMapper reportMapper;
    //统计员工性别信息
    @Override
    public List<Gender> selectGender() {
        //调用mapper层
       Gender man= reportMapper.selectGenderMan();
       man.setName("男性员工");
       Gender female=reportMapper.selectGenderFemale();
       female.setName("女性员工");
       List<Gender> genders =new ArrayList<Gender>();
       genders.add(man);
       genders.add(female);
       return genders;
    }

    /*@Override
    public List<JobSum> selectJobSum() {
        //调用mapper层
        reportMapper.selectJobSum
        return List.of();
    }*/
}
